home *** CD-ROM | disk | FTP | other *** search
/ Aminet 34 / Aminet 34 (2000)(Schatztruhe)[!][Dec 1999].iso / Aminet / util / gnu / unixcmds.lha / unixcmds / src / grep-2.1 / grep.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-06  |  1.5 KB  |  42 lines

  1. /* grep.h - interface to grep driver for searching subroutines.
  2.    Copyright (C) 1992 Free Software Foundation, Inc.
  3.  
  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 2, or (at your option)
  7.    any later version.
  8.  
  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU General Public License
  15.    along with this program; if not, write to the Free Software
  16.    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  17.    02111-1307, USA.  */
  18.  
  19. extern void fatal PARAMS((const char *, int));
  20. extern char *xmalloc PARAMS((size_t size));
  21. extern char *xrealloc PARAMS((char *ptr, size_t size));
  22.  
  23. /* Grep.c expects the matchers vector to be terminated
  24.    by an entry with a NULL name, and to contain at least
  25.    an entry named "default". */
  26.  
  27. extern struct matcher
  28. {
  29.   char *name;
  30.   void (*compile) PARAMS((char *, size_t));
  31.   char *(*execute) PARAMS((char *, size_t, char **));
  32. } matchers[];
  33.  
  34. /* Exported from grep.c. */
  35. extern char *matcher;
  36.  
  37. /* The following flags are exported from grep for the matchers
  38.    to look at. */
  39. extern int match_icase;        /* -i */
  40. extern int match_words;        /* -w */
  41. extern int match_lines;        /* -x */
  42.